/// <reference types="vitest" />
import { defineConfig } from "vitest/config";
import { resolve } from "path";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue(), vueJsx()],
    define: {
        PROD: JSON.stringify(false),
        DEV: JSON.stringify(false),
        TEST: JSON.stringify(true),
    },
    test: {
        globals: true,
        environment: "jsdom",
        exclude: [
            "**/node_modules/**",
            "**/dist/**",
            "**/true/coverage/**",
            "**/coverage/**",
        ],
        // 执行 test 命令之前执行的文件，即导入图标
        setupFiles: [resolve(__dirname, "./vitest.setup.ts")],
    },
});